//
//  SportDataCountModel.swift
//  LKSportManagerSDK
//
//  Created by KuaiKuai on 2023/8/23.
//

import UIKit

class SportDataCountModel: NSObject {
    // 运动记录ID
    let recorduuid: String
    /// 创建时间
    let createTime: Int64 = 0
    /// 数据源
    let dataResource: String = ""
    /// 配置ID
    let id: String
    /// 配置名
    let name: String
    /// 配置编码
    let code: String
    //心率
    var heartRate: Int?
    // 心率区间
    var heareRateRange: Int?
    // 心率等级
    var heartRateLevel: SportHeartRateLevel? = .l1
    // 心率质量
    var heartQuality: Int?
    // 心率得分
    var heartRateScore: Int = 0
    // 消耗
    var burn: Int = 0
    // 消耗得分
    var burnScore: Int = 0
    // 动作强度
    var actionIntensity: Int?
    // 动作质量
    var actionQuality: Int?
    // 动作得分
    var actionScore: Int = 0
    // 是否火力全开
    var isFireState = false
    // 总分
    var totalScore: Int = 0
    
    init(recorduuid: String, id: String, name: String, code: String) {
        self.recorduuid = recorduuid
        self.id = id
        self.name = name
        self.code = code
    }
}
public enum SportHeartRateLevel: Int {
    case l0 = 0
    case l1 = 1
    case l2 = 2
    case l3 = 3
    /// 得分系数
    var scoreFactor: Double {
        switch self {
        case .l0:
            return 1.0
        case .l1:
            return 1.01
        case .l2:
            return 1.02
        case .l3:
            return 1.03
        }
    }
}
